﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NDF.XnaLibrary.Models
{
	/// <summary>
	/// Class representing a character spell book. Holds all spells that the character currently knows.
	/// <para>IMPORTANT: THIS CLASS CURRENTLY IS JUST A DICTIONARY(INT, SKILL) WRAPPER!</para>
	/// </summary>
	public class SpellBook
	{
		private Dictionary<int, Skill> mSpellBook;

		public SpellBook()
		{
			mSpellBook = new Dictionary<int,Skill>();
			AddBasicTestingSkills();
		}

		private void AddBasicTestingSkills()
		{
			Skill skill = Skill.GetBasicSkill();
			mSpellBook.Add(skill.Id, skill);
		}

		public void LearnSkill(Skill skill)
		{
			mSpellBook.Add(skill.Id, skill);
		}

		public Skill GetSkill(int skillId)
		{
			return mSpellBook[skillId];
		}

		public bool HasLearnedSkill(int skillId)
		{
			return mSpellBook.ContainsKey(skillId);
		}
	}
}
